#include <iostream>
#include <vector>
#include <string>

using namespace std;

vector<string> numbers = {
    "Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten",
    "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen", "Twenty",
    "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety",
    "Hundred", "Thousand", "Million", "Billion"
};

string getWords(int num){
    if(num >= 1000000000) return getWords(num/1000000000)+ "Billion " + getWords(num%1000000000);
    if(num >= 1000000) return getWords(num/1000000)+ "Million " + getWords(num%1000000);
    if(num >= 1000) return getWords(num/1000)+ "Thousand " + getWords(num%1000);
    if(num >= 100) return getWords(num/100)+ "Hundred " + getWords(num%100);
    if(num >= 90) return "Ninety " + getWords(num%90);
    if(num >= 80) return "Eighty " + getWords(num%80);
    if(num >= 70) return "Seventy " + getWords(num%70);
    if(num >= 60) return "Sixty " + getWords(num%60);
    if(num >= 50) return "Fifty " + getWords(num%50);
    if(num >= 40) return "Forty " + getWords(num%40);
    if(num >= 30) return "Thirty " + getWords(num%30);
    if(num >= 20) return "Twenty " + getWords(num%20);
    if(num >= 1) return numbers[num] + " ";
    return "";
}

string numberToWords(int num) {
    if(num == 0) return numbers[0];
    string ret = getWords(num);
    ret.pop_back();
    return ret;
}

int main(){
    int num = 123456789;
    cout << numberToWords(num) << endl;
    return 0;
}
